


<script>
    let str = '[微笑][苦笑]'
    let reg = new RegExp('[[\u4e00-\u9fa5]+?]','g')
    let newStr = str.replace(reg,(a,b,c)=>{
        console.log(a);
        console.log(b);
        console.log(c);
        return '666'
    })
    console.log(newStr);

</script>